<?php
require_once 'conexao.php';

$tabela = @$_POST['tabela'];
$valor = @$_POST['valor'];

$query = "SELECT * FROM " . $tabela . " WHERE id = ". $valor;
$result = mysql_query($query);

$row = mysql_fetch_row($result);

$retorno = $tabela;
$i = 1;
while($i<count($row))
{
    $retorno = $retorno . "-" . $row[$i];
    $i++;
}

echo trim($retorno);

?>
